Product Code Database
Example Keywords: mobile world -jewel $86
   » » Wiki: Kleene Star
Tag Wiki 'Kleene Star'.
Tag

In mathematical logic and theoretical computer science, the Kleene star (or Kleene operator or Kleene closure) is a on a set to generate a set of all finite-length strings that are composed of zero or more repetitions of members from . It was named after American mathematician Stephen Cole Kleene, who first introduced and widely used it to characterize for regular expressions. In mathematics, it is more commonly known as the construction.


Definition
Given a set V, define
V^{0}=\{\varepsilon\} (the set consists only of the empty string),
V^{1}=V,
and define recursively the set
V^{i+1}=\{wv: w\in V^{i} \text{ and } v\in V \} for each i>0.
V^i is called the i-th power of V, it is a shorthand for the concatenation of V by itself i times. That is, V^i can be understood to be the set of all strings that can be represented as the concatenation of i members from V.

The definition of Kleene star on V is

(1991). 9780534923730, Brooks/Cole.

V^*=\bigcup_{i \ge 0 }V^i = V^0 \cup V^1 \cup V^2 \cup V^3 \cup V^4 \cup \cdots.


Kleene plus
In some studies, (e.g. AFL theory) a variation on the Kleene star operation called the Kleene plus is used. The Kleene plus omits the V^{0} term in the above union. In other words, the Kleene plus on V is

V^+=\bigcup_{i \geq 1} V^i = V^1 \cup V^2 \cup V^3 \cup \cdots,

or

V^+ = V^*V.


Examples
Example of Kleene star applied to a set of strings:
{"ab","c"}* = { ε, "ab", "c", "abab", "abc", "cab", "cc", "ababab", "ababc", "abcab", "abcc", "cabab", "cabc", "ccab", "ccc", ...}.
Example of Kleene star applied to a set of strings without the :
{"a","ab","b"}* = { ε, "a", "ab", "b", "aa", "aab", "aba", "abab", "abb", "ba", "bab", "bb", ...};
e.g. the string "aab" can be obtained in several different ways. The Sardinas-Patterson algorithm can be used to check for a given V whether any member of V* can be obtained in more than one way.

Example of Kleene and Kleene plus applied to a set of characters:

{"a", "b", "c"}* = { ε, "a", "b", "c", "aa", "ab", "ac", "ba", "bb", "bc", "ca", "cb", "cc", "aaa", "aab", ...}.
{"a", "b", "c"}+ = { "a", "b", "c", "aa", "ab", "ac", "ba", "bb", "bc", "ca", "cb", "cc", "aaa", "aab", ...}.


Properties
  • If V is any or countably infinite set, then V^* is a countably infinite set. As a result, each over a finite or countably infinite alphabet \Sigma is countable, since it is a subset of the countably infinite set \Sigma^{*}.
  • (V^{*})^{*}=V^{*}, which means that the Kleene star operator is an , as (V^{*})^{i}=V^{*} for every i\geq 1.
  • V^{*}=\{\varepsilon\}, if V is either the ∅ or the singleton set \{\varepsilon\}.


Generalization
Strings form a with concatenation as the binary operation and ε the identity element. In addition to strings, the Kleene star is defined for any monoid. More precisely, let ( M, ⋅) be a monoid, and SM. Then S* is the smallest submonoid of M containing S; that is, S* contains the neutral element of M, the set S, and is such that if x, yS*, then xyS*.

Furthermore, the Kleene star is generalized by including the *-operation (and the union) in the algebraic structure itself by the notion of complete star semiring.

(2025). 9783642014918, Springer. .


See also
  • Wildcard character
  • Glob (programming)


Notes

Further reading
Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs